package com.xmut.mall.member.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.xmut.mall.member.searchparam.MemberComponentsSearchParam;
import com.xmut.mall.member.utils.PageUtils;
import com.xmut.mall.member.entity.MemberEntity;
import com.xmut.mall.member.utils.RespBean;
import com.xmut.mall.member.vo.*;

import java.util.Map;

/**
 * 会员
 *
 * @author 1912120131suntingxing
 * @email 1192081604@qq.com
 * @date 2022-07-14 01:20:46
 */
public interface MemberService extends IService<MemberEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 注册用户
     * @param vo
     * @return
     */
    RespBean registerUser(RegisterVo vo);

    /**
     * 用户登录
     * @param vo
     * @return
     */
    RespBean login(LoginVo vo);

    /**
     * 根据手机号码查询用户
     * @param phone
     * @return
     */
    RespBean getUserByPhone(String phone);

    /**
     * 根据手机号码重置密码
     * @param vo
     * @return
     */
    RespBean resetPassword(ResetPasswordVo vo);

    /**
     * 修改用户个人信息
     * @param vo
     * @return
     */
    MemberEntity editUserInfo(EditMemberVo vo);

    /**
     * 检查该用户是否设置了密码
     * @param userId
     * @return
     */
    Boolean checkPwdStatus(Long userId);

    /**
     * 根据用户id修改密码
     * @param vo
     * @return
     */
    Boolean editPwd(EditPassWordVo vo);

    /**
     * 获取商城官方管理端的会员选择组件的分页数据
     * @param vo
     * @param param
     * @return
     */
    RespBean getManagerMemberComponentsPage(PageVO vo, MemberComponentsSearchParam param);
}

